import numpy as np
import random
import pandas as pd
students = {'小明': [12,14,13,17,16,19],
            '小李': [12,17,13,17,15,17],
            '小王': [10,17,13,14,15,16],
            '小花': [11,17,13,18,16,19],
            '小红': [10,19,13,18,18,17]}

total_sum = 0
for i in students.keys():
    key_to_sum = i
    for key, values in students.items():
        if key == key_to_sum:
            total_sum += sum(values)
            print(total_sum)

items = ['apple', 'banana', 'orange']
for index, item in enumerate(items):#enumerate 用于遍历序列内容及索引
    print(f"{index}: {item}")

# for values in students.values():
#     if key == key_to_sum: #错误原因遍历键值对时候，仅仅遍历了值，健无法用
#         print(values)











#



# df = pd.DataFrame(students)
# df.to_excel(r'D:\ITAudit\pandas_excel\st_list.xlsx')






